<?php


namespace Modules\Admin\Http\Controllers\Authorization\Permission;


use Modules\Common\General\Security\Authorization\Manager;
use Modules\Common\Util\Api;

class TraceUser
{
    /**
     * @Route(path=/api/admin/authorization/permission/trace-user pname=jjj)
     */
    public function index()
    {
        Api::validate( ['permission_id' => 'integer', 'branch_id' => 'integer']);
        $m = new Manager();
        $users = $m->getImplicitUsersForPermissionForPresentation(request('permission_id'), request('branch_id'));
        return Api::success($users);
    }

}
